// Problem: 
// Contest: 
// URL: 
// Memory Limit: 
// Time Limit: 
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include<bits/stdc++.h>
#define rep(i,a,n) for(int (i)=(a);(i)<=(n);(i)++)
#define pre(i,a,n) for(int (i)=(a);(i)>=(n);(i)--)
#define int long long
using namespace std;
const int N=1e5+5,mod=1e9+7;
inline int read(){
	int s=0,w=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
	return s*w;
}
int fac[N],infac[N];
int n,d[N],L,R,ans,cur[N],vis[N];
int qpow(int x,int n)
{
	int ret=1;
	while(n)
	{
		if(n&1)ret=ret*x%mod;
		x=x*x%mod;
		n>>=1;
	}
	return ret;
}
int inv(int x)
{
	return qpow(x,mod-2);
}
void init(int n)
{
	fac[0]=infac[0]=1;
	rep(i,1,n)
	{
		fac[i]=fac[i-1]*i%mod;
		infac[i]=inv(fac[i]);
	}
}
int C(int a,int b)
{
	if(a<b||a<0||b<0)return 0;
	return fac[a]*infac[a-b]%mod*infac[b]%mod;
}
int get(int x)
{
	if(!vis[x])
	{
		vis[x]=1;
		rep(i,L-1,R-1)
		{
			cur[x]=(cur[x]+C(x,i))%mod;
		}
		return cur[x];
	}
	else return cur[x];
}
void solve()
{
	cin>>n;
	rep(i,1,n-1)
	{
		int u,v;
		cin>>u>>v;
		d[u]++,d[v]++;
	}
	cin>>L>>R;
	init(n);
	rep(i,1,n)ans=(ans+get(d[i]))%mod;
	if(L<=2&&2<=R)ans=((ans-n+1)%mod+mod)%mod;
	cout<<ans<<endl;
}
signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	int T=1;
//	cin>>T;
	while(T--)
	{
		solve();
	}
	return 0;
}
